package com.mg.sms;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;

/**
 * <p>Title: com.mg.sms.MessageReceier</p>
 * <p>Description: 開機時啟動訊息服務</p>
 * <p>Copyright: Copyright (c) 2011</p>
 * <p>Company: FreeLance</p>
 * @author Jason Huang
 * @version 1.0
 */
public class MessageReceier extends BroadcastReceiver {
    
    @Override
    public void onReceive(Context context, Intent intent) {
        if (intent.getAction().equals(Intent.ACTION_BOOT_COMPLETED)){  
            Intent messageService = new Intent(context, MessageService.class);
            messageService.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
            context.startService(messageService);
        }
    }
}
